home *** CD-ROM | disk | FTP | other *** search
/ Languguage OS 2 / Languguage OS II Version 10-94 (Knowledge Media)(1994).ISO / gnu / dejagnu.lha / dejagnu-1.0.1 / config.sub < prev    next >
Text File  |  1993-05-06  |  16KB  |  814 lines

  1. #!/bin/sh
  2. # Configuration validation subroutine script, version 1.1.
  3. #   Copyright (C) 1991-1993 Free Software Foundation, Inc.
  4. # This file is (in principle) common to ALL GNU software.
  5. # The presence of a machine in this file suggests that SOME GNU software
  6. # can handle that machine.  It does not imply ALL GNU software can. 
  7.  
  8. #This file is free software; you can redistribute it and/or modify
  9. #it under the terms of the GNU General Public License as published by
  10. #the Free Software Foundation; either version 2 of the License, or
  11. #(at your option) any later version.
  12.  
  13. #This program is distributed in the hope that it will be useful,
  14. #but WITHOUT ANY WARRANTY; without even the implied warranty of
  15. #MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  16. #GNU General Public License for more details.
  17.  
  18. #You should have received a copy of the GNU General Public License
  19. #along with this program; if not, write to the Free Software
  20. #Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
  21.  
  22.  
  23. # Configuration subroutine to validate and canonicalize a configuration type.
  24. # Supply the specified configuration type as an argument.
  25. # If it is invalid, we print an error message on stderr and exit with code 1.
  26. # Otherwise, we print the canonical config type on stdout and succeed.
  27.  
  28. # This file is supposed to be the same for all GNU packages
  29. # and recognize all the CPU types, system types and aliases
  30. # that are meaningful with *any* GNU software.
  31. # Each package is responsible for reporting which valid configurations
  32. # it does not support.  The user should be able to distinguish
  33. # a failure to support a valid configuration from a meaningless
  34. # configuration.
  35.  
  36. # The goal of this file is to map all the various variations of a given
  37. # machine specification into a single specification in the form:
  38. #    CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM
  39. # It is wrong to echo any other type of specification.
  40.  
  41. if [ x$1 = x ]
  42. then
  43.     echo Configuration name missing. 1>&2
  44.     echo "Usage: $0 CPU-MFR-OPSYS" 1>&2
  45.     echo "or     $0 ALIAS" 1>&2
  46.     echo where ALIAS is a recognized configuration type. 1>&2
  47.     exit 1
  48. fi
  49.  
  50. # First pass through any local machine types.
  51. case $1 in
  52.     *local*)
  53.         echo $1
  54.         exit 0
  55.         ;;
  56.     *)
  57.     ;;
  58. esac
  59.  
  60. # Separate what the user gave into CPU-COMPANY and OS (if any).
  61. basic_machine=`echo $1 | sed 's/-[^-]*$//'`
  62. if [ $basic_machine != $1 ]
  63. then os=`echo $1 | sed 's/.*-/-/'`
  64. else os=; fi
  65.  
  66. ### Let's recognize common machines as not being operating systems so
  67. ### that things like config.sub decstation-3100 work.  We also
  68. ### recognize some manufacturers as not being operating systems, so we
  69. ### can provide default operating systems below.
  70. case $os in
  71.     -dec* | -mips* | -sequent* | -encore* | -pc532* | -sgi* | -sony* | \
  72.     -att* | -7300* | -3300* | -delta* | -motorola* | -sun[234]* | \
  73.     -unicom* | -ibm* | -next* | -hp | -isi* | -apollo | -altos* | \
  74.     -convergent* | -ncr* | -news | -32* | -3600* | -3100* | \
  75.     -c[123]* | -convex* | -sun | -crds | -omron* | -dg | -ultra | -tti* | \
  76.     -harris | -dolphin | -highlevel | -gould | -cbm | -ns | -masscomp)
  77.         os=
  78.         basic_machine=$1
  79.         ;;
  80.     -scout)                        # CYGNUS LOCAL
  81.         ;;
  82.     -wrs)                        # CYGNUS LOCAL
  83.         os=vxworks
  84.         basic_machine=$1
  85.         ;;
  86.     -sco3.2v[4-9]*)
  87.         # Don't forget version if it is 3.2v4 or newer.
  88.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  89.         ;;
  90.     -sco*)
  91.         os=-sco3.2v2
  92.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  93.         ;;
  94.     -isc)
  95.         os=-isc2.2
  96.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  97.         ;;
  98.     -clix*)
  99.         basic_machine=clipper-intergraph
  100.         ;;
  101.     -isc*)
  102.         basic_machine=`echo $1 | sed -e 's/86-.*/86-unknown/'`
  103.         ;;
  104. esac
  105.  
  106. # Decode aliases for certain CPU-COMPANY combinations.
  107. case $basic_machine in
  108.     # Recognize the basic CPU types with without company name.
  109.     # Some are omitted here because they have special meanings below.
  110.     tahoe | i[34]86 | i860 | m68k | m68000 | m88k | ns32k | arm | pyramid \
  111.         | tron | a29k | 580 | i960 | h8300 | hppa1.0 | hppa1.1 \
  112.         | alpha | we32k | ns16k | clipper | sparclite \
  113.         | sparc | m680[01234]0 | m683?2 | z8k | v70 | h8500)# CYGNUS LOCAL
  114.         basic_machine=$basic_machine-unknown
  115.         ;;
  116.     # Recognize the basic CPU types with with company name.
  117.     vax-* | tahoe-* | i[34]86-* | i860-* | m68k-* | m68000-* | m88k-* \
  118.           | sparc-* | ns32k-* | fx80-* | arm-* | c[123]* \
  119.           | mips-* | pyramid-* | tron-* | a29k-* | romp-* | rs6000-* \
  120.           | none-* | 580-* | cray2-* | h8300-* | i960-* | xmp-* | ymp-* \
  121.           | hppa1.0-* | hppa1.1-* | alpha-* | we32k-* | cydra-* | ns16k-* \
  122.           | pn-* | np1-* | xps100-* | clipper-* | orion-* | sparclite-* \
  123.           | m680[01234]0-* | m683?2-* | z8k-* | h8500-* | sh-*)    # CYGNUS LOCAL
  124.         ;;
  125.     # Recognize the various machine names and aliases which stand
  126.     # for a CPU type and a company and sometimes even an OS.
  127.  
  128.  
  129.     dpx20 | dpx20-*)                # CYGNUS LOCAL
  130.         basic_machine=rs6000-bull
  131.         os=-bosx
  132.         ;;
  133.     vaxv)
  134.         basic_machine=vax-dec
  135.         os=-sysv
  136.         ;;
  137.     vms)
  138.         basic_machine=vax-dec
  139.         os=-vms
  140.         ;;
  141.     i386mach)                    # CYGNUS LOCAL
  142.         basic_machine=i386-mach
  143.         os=-mach
  144.         ;;
  145.     i[34]86v32)
  146.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  147.         os=-sysv3.2
  148.         ;;
  149.     i[34]86v4*)
  150.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  151.         os=-sysv4
  152.         ;;
  153.     i[34]86v)
  154.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  155.         os=-sysv
  156.         ;;
  157.     i[34]86sol2)
  158.         basic_machine=`echo $1 | sed -e 's/86.*/86-unknown/'`
  159.         os=-solaris2
  160.         ;;
  161.     go32 | i386-go32)                # CYGNUS LOCAL
  162.         basic_machine=i386-unknown
  163.         os=-go32
  164.         ;;
  165.     i386-linux* | linux)                # CYGNUS LOCAL
  166.         basic_machine=i386-unknown
  167.         os=-linux
  168.         ;;
  169.     386bsd)                        # CYGNUS LOCAL
  170.         basic_machine=i386-unknown
  171.         os=-bsd
  172.         ;;
  173.     spur)
  174.         basic_machine=spur-unknown
  175.         ;;
  176.     alliant | fx80)
  177.         basic_machine=fx80-alliant
  178.         ;;
  179.     convex-c1)
  180.         basic_machine=c1-convex
  181.         os=-bsd
  182.         ;;
  183.     convex-c2)
  184.         basic_machine=c2-convex
  185.         os=-bsd
  186.         ;;
  187.     convex-c32)
  188.         basic_machine=c32-convex
  189.         os=-bsd
  190.         ;;
  191.     convex-c34)
  192.         basic_machine=c34-convex
  193.         os=-bsd
  194.         ;;
  195.     convex-c38)
  196.         basic_machine=c38-convex
  197.         os=-bsd
  198.         ;;
  199.     m88k-omron*)
  200.         basic_machine=m88k-omron
  201.         ;;
  202.     merlin)
  203.         basic_machine=ns32k-utek
  204.         os=-sysv
  205.         ;;
  206.     crds | unos)
  207.         basic_machine=m68k-crds
  208.         ;;
  209.     elxsi)
  210.         basic_machine=elxsi-elxsi
  211.         os=-bsd
  212.         ;;
  213.     encore | umax | mmax)
  214.         basic_machine=ns32k-encore
  215.         ;;
  216.     genix)
  217.         basic_machine=ns32k-ns
  218.         ;;
  219.     iris | iris4d | \
  220.     iris3 | iris4)                    # CYGNUS LOCAL
  221.         basic_machine=mips-sgi
  222.         case $os in
  223.             -irix*)
  224.             ;;
  225.             *)
  226.             os=-irix4
  227.             ;;
  228.         esac
  229.         ;;
  230.     news | news700 | news800 | news900)
  231.         basic_machine=m68k-sony
  232.         os=-newsos
  233.         ;;
  234.     3b1 | 7300 | 7300-att | att-7300 | pc7300 | safari | unixpc)
  235.         basic_machine=m68000-att
  236.         ;;
  237.     3b*)
  238.         basic_machine=we32k-att
  239.         ;;
  240.     delta | 3300 | motorola-3300 | motorola-delta \
  241.           | 3300-motorola | delta-motorola)
  242.         basic_machine=m68k-motorola
  243.         ;;
  244.     balance)
  245.         basic_machine=ns32k-sequent
  246.         os=-dynix
  247.         ;;
  248.         pc532)
  249.         basic_machine=ns32k-pc532
  250.         ;;
  251.     symmetry)
  252.         basic_machine=i386-sequent
  253.         os=-dynix
  254.         ;;
  255.     sun2)
  256.         basic_machine=m68000-sun
  257.         ;;
  258.     sun2os3)
  259.         basic_machine=m68000-sun
  260.         os=-sunos3
  261.         ;;
  262.     sun2os4)
  263.         basic_machine=m68000-sun
  264.         os=-sunos4
  265.         ;;
  266.     sun3os3)
  267.         basic_machine=m68k-sun
  268.         os=-sunos3
  269.         ;;
  270.     sun3os4)
  271.         basic_machine=m68k-sun
  272.         os=-sunos4
  273.         ;;
  274.     sun4os3)
  275.         basic_machine=sparc-sun
  276.         os=-sunos3
  277.         ;;
  278.     sun4os4)
  279.         basic_machine=sparc-sun
  280.         os=-sunos4
  281.         ;;
  282.     sun4sol2)                    # CYGNUS LOCAL
  283.         basic_machine=sparc-sun
  284.         os=-solaris2
  285.         ;;
  286.     z8ksim)                        # CYGNUS LOCAL
  287.         basic_machine=z8k-zilog
  288.         os=-sim
  289.         ;;
  290.     z8k)                        # CYGNUS LOCAL
  291.         basic_machine=z8k-zilog
  292.         ;;
  293.     sun3)
  294.         basic_machine=m68k-sun
  295.         ;;
  296.     sun4)
  297.         basic_machine=sparc-sun
  298.         ;;
  299.     msdos)                        # CYGNUS LOCAL
  300.         basic_machine=i386-unknown    
  301.         os=-msdos
  302.         ;;
  303.     pbd)
  304.         basic_machine=sparc-tti
  305.         ;;
  306.     pbb)
  307.         basic_machine=m68k-tti
  308.         ;;
  309.     sun386 | sun386i | roadrunner)
  310.         basic_machine=i386-sun
  311.         ;;
  312.     ps2)
  313.         basic_machine=i386-ibm
  314.         ;;
  315.     fx2800)
  316.         basic_machine=i860-alliant
  317.         ;;
  318.     next)
  319.         basic_machine=m68k-next
  320.         os=-bsd
  321.         ;;
  322.     amiga)
  323.         basic_machine=m68k-cbm
  324.         ;;
  325.     amigados)
  326.         basic_machine=m68k-cbm
  327.         os=-amigados
  328.         ;;
  329.     amigaunix | amix)
  330.         basic_machine=m68k-cbm
  331.         os=-sysv4
  332.         ;;
  333.     hp9k3[2-9][0-9])
  334.         basic_machine=m68k-hp
  335.         ;;
  336.     hp9k31[0-9] | hp9k2[0-9][0-9])
  337.         basic_machine=m68000-hp
  338.         ;;
  339.     hp9k7[0-9][0-9] | hp7[0-9][0-9] | hp9k8[0-9]7 | hp8[0-9]7)
  340.         basic_machine=hppa1.1-hp
  341.         ;;
  342.     hp9k8[0-9][0-9] | hp8[0-9][0-9])
  343.         basic_machine=hppa1.0-hp
  344.         ;;
  345.     isi68 | isi)
  346.         basic_machine=m68k-isi
  347.         os=-sysv
  348.         ;;
  349.     apollo68)
  350.         basic_machine=m68k-apollo
  351.         os=-sysv
  352.         ;;
  353.     apollo68bsd)                    # CYGNUS LOCAL
  354.         basic_machine=m68k-apollo
  355.         os=-bsd
  356.         ;;
  357.     altos | altos3068)
  358.         basic_machine=m68k-altos
  359.         ;;
  360.     miniframe)
  361.         basic_machine=m68000-convergent
  362.         ;;
  363.     tower | tower-32)
  364.         basic_machine=m68k-ncr
  365.         ;;
  366.     news-3600 | risc-news)
  367.         basic_machine=mips-sony
  368.         os=-newsos
  369.         ;;
  370.     st2000)                        # CYGNUS LOCAL
  371.         basic_machine=m68k-tandem
  372.         ;;
  373.     decstation | decstation-3100 | pmax | pmin | dec3100 | decstatn)
  374.         basic_machine=mips-dec
  375.         ;;
  376.     magnum | m3230)
  377.         basic_machine=mips-mips
  378.         os=-sysv
  379.         ;;
  380.     gmicro)
  381.         basic_machine=tron-gmicro
  382.         os=-sysv
  383.         ;;
  384.     rtpc | rtpc-*)
  385.         basic_machine=romp-ibm
  386.         ;;
  387.     am29k)
  388.         basic_machine=a29k-none
  389.         os=-bsd
  390.         ;;
  391.     amdahl)
  392.         basic_machine=580-amdahl
  393.         os=-sysv
  394.         ;;
  395.     stratus)                    # CYGNUS LOCAL
  396.         basic_machine=i860-stratus
  397.         os=-sysv4
  398.         ;;
  399.     cray | ymp)
  400.         basic_machine=ymp-cray
  401.         os=-unicos
  402.         ;;
  403.     cray2)
  404.         basic_machine=cray2-cray
  405.         os=-unicos
  406.         ;;
  407.     xmp)
  408.         basic_machine=xmp-cray
  409.         os=-unicos
  410.         ;;
  411.     delta88)
  412.         basic_machine=m88k-motorola
  413.         os=-sysv3
  414.         ;;
  415.     dpx2)
  416.         basic_machine=m68k-bull
  417.         os=-sysv
  418.         ;;
  419.     ebmon29k)
  420.         basic_machine=a29k-amd
  421.         os=-ebmon
  422.         ;;
  423.     h8300hms)                    # CYGNUS LOCAL
  424.         basic_machine=h8300-hitachi
  425.         os=-hms
  426.         ;;
  427.  
  428.     sh)                        # CYGNUS LOCAL
  429.         basic_machine=sh-hitachi
  430.         os=-hms
  431.         ;;
  432.  
  433.     h8500hms)                    # CYGNUS LOCAL
  434.         basic_machine=h8500-hitachi
  435.         os=-hms
  436.         ;;
  437.     h8300xray)                    # CYGNUS LOCAL
  438.         basic_machine=h8300-hitachi
  439.         os=-xray
  440.         ;;
  441.     h8300hds)
  442.         basic_machine=h8300-hitachi
  443.         os=-hds
  444.         ;;
  445.     udi29k)                        # CYGNUS LOCAL
  446.         basic_machine=a29k-amd
  447.         os=-udi
  448.         ;;
  449.     a29khif)                    # CYGNUS LOCAL
  450.         basic_machine=a29k-amd
  451.         os=-udi
  452.         ;;
  453.     sa29200)                    # CYGNUS LOCAL
  454.         basic_machine=a29k-amd
  455.         os=-udi
  456.         ;;
  457.     harris)
  458.         basic_machine=m88k-harris
  459.         os=-sysv3
  460.         ;;
  461.     hp300bsd)
  462.         basic_machine=m68k-hp
  463.         os=-bsd
  464.         ;;
  465.     hp300hpux)
  466.         basic_machine=m68k-hp
  467.         os=-hpux
  468.         ;;
  469.     hp9k2[0-9][0-9] | hp9k31[0-9])
  470.         basic_machine=m68000-hp
  471.         os=-hpux
  472.         ;;
  473.     hp9k3[2-9][0-9])
  474.         basic_machine=m68k-hp
  475.         os=-hpux
  476.         ;;
  477.     hppaosf)
  478.         basic_machine=hppa1.1-hp
  479.         os=-osf
  480.         ;;
  481.     ncr3000)
  482.         basic_machine=i486-ncr
  483.         os=-sysv4
  484.         ;;
  485.     necv70)                        # CYGNUS LOCAL
  486.         basic_machine=v70-nec
  487.         os=-sysv
  488.         ;;
  489.     news1000)
  490.         basic_machine=m68030-sony
  491.         os=-newsos
  492.         ;;
  493.     nindy960)
  494.         basic_machine=i960-intel
  495.         os=-nindy
  496.         ;;
  497.     pn)
  498.         basic_machine=pn-gould
  499.         ;;
  500.     np1)
  501.         basic_machine=np1-gould
  502.         ;;
  503.     ultra3)
  504.         basic_machine=a29k-nyu
  505.         os=-sym1
  506.         ;;
  507.     vxworks960)
  508.         basic_machine=i960-wrs
  509.         os=-vxworks
  510.         ;;
  511.     vxworks68)
  512.         basic_machine=m68k-wrs
  513.         os=-vxworks
  514.         ;;
  515.     es1800 | OSE68k | ose68k | ose | OSE)        # CYGNUS LOCAL
  516.         basic_machine=m68k-ericsson
  517.         os=-ose
  518.         ;;
  519.     OSE68000 | ose68000)                # CYGNUS LOCAL
  520.         basic_machine=m68000-ericsson
  521.         os=-ose
  522.         ;;
  523.     os68k)                        # CYGNUS LOCAL
  524.         basic_machine=m68k-none
  525.         os=-os68k
  526.         ;;
  527.     sparclite-wrs)                    # CYGNUS LOCAL
  528.         basic_machine=sparclite-wrs
  529.         os=-vxworks
  530.         ;;
  531.     sparcfrw)                    # CYGNUS LOCAL
  532.         basic_machine=sparcfrw-sun
  533.         os=-sunos4
  534.         ;;
  535.     sparcfrwcompat)                    # CYGNUS LOCAL
  536.         basic_machine=sparcfrwcompat-sun
  537.         os=-sunos4
  538.         ;;
  539.     sparclitefrw)                    # CYGNUS LOCAL
  540.         basic_machine=sparclitefrw-fujitsu
  541.         os=-none
  542.         ;;
  543.     sparclitefrwcompat)                # CYGNUS LOCAL
  544.         basic_machine=sparclitefrwcompat-fujitsu
  545.         os=-none
  546.         ;;
  547.     adobe68k)                    # CYGNUS LOCAL
  548.         basic_machine=m68010-adobe
  549.         os=-scout
  550.         ;;
  551.  
  552.         xps | xps100)
  553.         basic_machine=xps100-honeywell
  554.         ;;
  555.     none)
  556.         basic_machine=none-none
  557.         os=-none
  558.         ;;
  559.  
  560. # Here we handle the default manufacturer of certain CPU types.  It is in
  561. # some cases the only manufacturer, in others, it is the most popular.
  562.     mips)
  563.         basic_machine=mips-mips
  564.         ;;
  565.     romp)
  566.         basic_machine=romp-ibm
  567.         ;;
  568.     rs6000)
  569.         basic_machine=rs6000-ibm
  570.         ;;
  571.     vax)
  572.         basic_machine=vax-dec
  573.         ;;
  574.     we32k)
  575.         basic_machine=we32k-att
  576.         ;;
  577.     sparc)
  578.         basic_machine=sparc-sun
  579.         ;;
  580.         cydra)
  581.         basic_machine=cydra-cydrome
  582.         ;;
  583.     orion)
  584.         basic_machine=orion-highlevel
  585.         ;;
  586.     orion105)
  587.         basic_machine=clipper-highlevel
  588.         ;;
  589.     *)
  590.         echo Invalid configuration \`$1\': machine \`$basic_machine\' not recognized 1>&2
  591.         exit 1
  592.         ;;
  593. esac
  594.  
  595. # Here we canonicalize certain aliases for manufacturers.
  596. case $basic_machine in
  597.     *-digital*)
  598.         basic_machine=`echo $basic_machine | sed 's/digital.*/dec/'`
  599.         ;;
  600.     *-commodore*)
  601.         basic_machine=`echo $basic_machine | sed 's/commodore.*/cbm/'`
  602.         ;;
  603.     *)
  604.         ;;
  605. esac
  606.  
  607. # Decode manufacturer-specific aliases for certain operating systems.
  608.  
  609. if [ "$os" ]
  610. then
  611. case $os in
  612.     # -solaris* is a basic system type, with this one exception.
  613.     -solaris1 | -solaris1.*)
  614.         os=`echo $os | sed -e 's|solaris1|sunos4|'`
  615.         ;;
  616.     # First accept the basic system types.
  617.     # The portable systems comes first.
  618.     # Each alternative must end in a *, to match a version number.
  619.     -bsd* | -sysv* | -mach* | -minix* | -genix* | -ultrix* | -irix* \
  620.           | -vms* | -sco* | -esix* | -isc* | -aix* | -sunos | -sunos[34]* | -hpux* \
  621.           | -unos* | -osf* | -luna* | -dgux* | -solaris* | -sym* \
  622.           | -amigados* | -msdos* | -newsos* | -unicos* | -aos* \
  623.           | -nindy* | -vxworks* | -ebmon* | -hds*  \
  624.           | -riscos* | -linux* | -uniplus* | -iris* | -rtu* | -xenix* \
  625.           | -go32 | -sim | -es1800* | -udi | -hms* | -xray \
  626.           | -os68k* | -none* | -v88r* | -aout | -coff | -elf | -bosx* \
  627.           | -abug | -ecoff)
  628.                 # The last three lines above are CYGNUS LOCAL
  629.     ;;
  630.     -sunos5*)
  631.         os=`echo $os | sed -e 's|sunos5|solaris2|'`
  632.         ;;
  633.     -sunos6*)
  634.         os=`echo $os | sed -e 's|sunos6|solaris3|'`
  635.         ;;
  636.     -osfrose*)
  637.         os=-osfrose
  638.         ;;
  639.     -osf*)
  640.         os=-osf
  641.         ;;
  642.     -utek*)
  643.         os=-bsd
  644.         ;;
  645.     -dynix*)
  646.         os=-bsd
  647.         ;;
  648.     -acis*)
  649.         os=-aos
  650.         ;;
  651.     -386bsd)                    # CYGNUS LOCAL
  652.         os=-bsd
  653.         ;;
  654.     -ctix* | -uts*)
  655.         os=-sysv
  656.         ;;
  657.     -triton*)
  658.         os=-sysv3
  659.         ;;
  660.     -oss*)
  661.         os=-sysv3
  662.         ;;
  663.     -svr4)
  664.         os=-sysv4
  665.         ;;
  666.     -svr3)
  667.         os=-sysv3
  668.         ;;
  669.     -ose*)                        # CYGNUS LOCAL
  670.         os=-ose
  671.         ;;
  672.     -es1800*)                    # CYGNUS LOCAL
  673.         os=-ose
  674.         ;;
  675.     -xenix)
  676.         os=-xenix
  677.         ;;
  678.     -none)
  679.         ;;
  680.     *)
  681.         # Get rid of the `-' at the beginning of $os.
  682.         os=`echo $1 | sed 's/[^-]*-//'`
  683.         echo Invalid configuration \`$1\': system \`$os\' not recognized 1>&2
  684.         exit 1
  685.         ;;
  686. esac
  687. else
  688.  
  689. # Here we handle the default operating systems that come with various machines.
  690. # The value should be what the vendor currently ships out the door with their
  691. # machine or put another way, the most popular os provided with the machine.
  692.  
  693. # Note that if you're going to try to match "-MANUFACTURER" here (say,
  694. # "-sun"), then you have to tell the case statement up towards the top
  695. # that MANUFACTURER isn't an operating system.  Otherwise, code above
  696. # will signal an error saying that MANUFACTURER isn't an operating
  697. # system, and we'll never get to this point.
  698.  
  699. case $basic_machine in
  700.     *-dec | vax-*)
  701.         os=-ultrix4.2
  702.         ;;
  703.     i386-sun)
  704.         os=-sunos4.0.2
  705.         ;;
  706.     m68000-sun)
  707.         os=-sunos3
  708.         # This also exists in the configure program, but was not the
  709.         # default.
  710.         # os=-sunos4
  711.         ;;
  712.     *-tti)    # must be before sparc entry or we get the wrong os.
  713.         os=-sysv3
  714.         ;;
  715.     sparc-* | *-sun)
  716.         os=-sunos4.1.1
  717.         ;;
  718.     *-ibm)
  719.         os=-aix
  720.         ;;
  721.     *-hp)
  722.         os=-hpux
  723.         ;;
  724.     i860-* | *-att | *-ncr | *-altos | *-motorola | *-convergent)
  725.         os=-sysv
  726.         ;;
  727.     *-cbm)
  728.         os=-amigados
  729.         ;;
  730.     *-dg)
  731.         os=-dgux
  732.         ;;
  733.     *-dolphin)
  734.         os=-sysv3
  735.         ;;
  736.     m88k-omron*)
  737.         os=-luna
  738.         ;;
  739.     *-sequent)
  740.         os=-bsd
  741.         ;;
  742.     *-crds)
  743.         os=-unos
  744.         ;;
  745.     *-ns)
  746.         os=-genix
  747.         ;;
  748.     i[34]86-*)
  749.         os=-sco3.2v2
  750.         ;;
  751.         *-gould)
  752.         os=-sysv
  753.         ;;
  754.         *-highlevel)
  755.         os=-bsd
  756.         ;;
  757.     *-encore)
  758.         os=-bsd
  759.         ;;
  760.         *-sgi)
  761.         os=-irix
  762.         ;;
  763.     *-masscomp)
  764.         os=-rtu
  765.         ;;
  766.     *)
  767.         os=-none
  768.         ;;
  769. esac
  770. fi
  771.  
  772. # Here we handle the case where we know the os, and the CPU type, but not the
  773. # manufacturer.  We pick the logical manufacturer.
  774. vendor=unknown
  775. case $basic_machine in
  776.     *-unknown)
  777.         case $os in
  778.             -sunos*)
  779.                 vendor=sun
  780.                 ;;
  781.             -bosx*)            # CYGNUS LOCAL
  782.                 vendor=bull
  783.                 ;;
  784.             -aix*)
  785.                 vendor=ibm
  786.                 ;;
  787.             -hpux*)
  788.                 vendor=hp
  789.                 ;;
  790.             -unos*)
  791.                 vendor=crds
  792.                 ;;
  793.             -dgux*)
  794.                 vendor=dg
  795.                 ;;
  796.             -luna*)
  797.                 vendor=omron
  798.                 ;;
  799.             -genix*)
  800.                 vendor=ns
  801.                 ;;
  802.             -vxworks*)            # CYGNUS LOCAL
  803.                 vendor=wrs
  804.                 ;;
  805.             -hms*)                # CYGNUS LOCAL
  806.                 vendor=hitachi
  807.                 ;;
  808.         esac
  809.         basic_machine=`echo $basic_machine | sed "s/unknown/$vendor/"`
  810.         ;;
  811. esac
  812.  
  813. echo $basic_machine$os
  814.